package com.ihelp.service.impl;

import com.ihelp.pojo.Area;
import com.ihelp.mapper.AreaMapper;
import com.ihelp.service.AreaService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author LiuZiMing
 * @since 2023-06-01
 */
@Service
public class AreaServiceImpl extends ServiceImpl<AreaMapper, Area> implements AreaService {

    @Autowired
    private AreaMapper areaMapper;
    @Override
    public List<Area> getAllArea() {
        return areaMapper.selectList(null);
    }

    @Override
    public Area getAreaById(Integer id) {
        return areaMapper.selectById(id);
    }
}
